package cn.z2huo.demo.spring.cloud.alibaba.provider.controller.user;

import cn.z2huo.demo.spring.cloud.alibaba.provider.api.user.UserClient;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *
 * @author z2huo
 */
@Slf4j
@RestController
public class UserController implements UserClient {

    @Override
    public String getUserNameByCode(@RequestParam String userCode) {
        log.info("provider /user/getUserNameByCode userCode is {}", userCode);
        return "userName " + RandomStringUtils.randomAlphabetic(8);
    }

}
